summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-06-12 21:31:15 +0000
committerLang Hames <lhames@gmail.com>2015-06-12 21:31:15 +0000
commit2e36ddf6717638b80f2fcdedcda4b3de054df842 (patch)
tree122492353ac6eb92c4ec451141d667118f175629 /llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
parentb274738725f2e25595a6e1d021699194c146221a (diff)
downloadbcm5719-llvm-2e36ddf6717638b80f2fcdedcda4b3de054df842.tar.gz
bcm5719-llvm-2e36ddf6717638b80f2fcdedcda4b3de054df842.zip
[Orc] Fix a bug in the CompileOnDemand layer where stub decls were not cloned
into partitions. Also, add an option to clone stub definitions (not just decls) into partitions: these definitions could be inlined in some places to avoid the overhead of calling via the stub. Found by inspection - no test case yet, although I plan to add a unit test for this once the CompileOnDemand layer refactoring settles down. llvm-svn: 239640
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
index 4ed87303148..b439810ed33 100644
--- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
@@ -30,8 +30,6 @@ Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) {
GlobalVariable* createImplPointer(PointerType &PT, Module &M,
const Twine &Name, Constant *Initializer) {
- if (!Initializer)
- Initializer = Constant::getNullValue(&PT);
auto IP = new GlobalVariable(M, &PT, false, GlobalValue::ExternalLinkage,
Initializer, Name, nullptr,
GlobalValue::NotThreadLocal, 0, true);
OpenPOWER on IntegriCloud