[Orc][RuntimeDyld] Prevent duplicate calls to finalizeMemory on shared memory
[oota-llvm.git] / unittests / ExecutionEngine / Orc / OrcTestCommon.cpp
index 1b5485d3b33ba1184ca8119d5ccbf6936903cadc..17d1e9c9276e76ce7b086e13e710a6779de334db 100644 (file)
@@ -19,7 +19,7 @@ bool OrcExecutionTest::NativeTargetInitialized = false;
 
 ModuleBuilder::ModuleBuilder(LLVMContext &Context, StringRef Triple,
                              StringRef Name)
-  : M(new Module(Name, Context)),
-    Builder(Context) {
-  M->setTargetTriple(Triple);
+  : M(new Module(Name, Context)) {
+  if (Triple != "")
+    M->setTargetTriple(Triple);
 }