Created
January 2, 2019 11:55
-
-
Save CFSworks/de1a858771c846e9ab57999571c1715c to your computer and use it in GitHub Desktop.
LLVM LTO bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "common.h" | |
X<int> *make_X() | |
{ | |
return new X<int>; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "common.h" | |
template class X<int>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseClass { | |
public: | |
~BaseClass() { }; | |
}; | |
template<typename T> | |
class X : public BaseClass { | |
public: | |
virtual ~X() { }; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libbug.so: a.o b.o | |
clang++ -O1 -flto -shared -o $@ $^ | |
%.o: %.cpp common.h | |
clang++ -O1 -flto -o $@ -c $< | |
clean: | |
rm libbug.so a.o b.o | |
.PHONY: clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment