aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bugpoint/Miscompilation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bugpoint/Miscompilation.cpp')
-rw-r--r--tools/bugpoint/Miscompilation.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index 64dfe88..9c14147 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/tools/bugpoint/Miscompilation.cpp
@@ -14,6 +14,7 @@
#include "BugDriver.h"
#include "ListReducer.h"
+#include "ToolRunner.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
@@ -937,13 +938,13 @@ bool BugDriver::debugCodeGenerator() {
outs() << '\n';
outs() << "The shared object was created with:\n llc -march=c "
<< SafeModuleBC << " -o temporary.c\n"
- << " gcc -xc temporary.c -O2 -o " << SharedObject
-#if defined(sparc) || defined(__sparc__) || defined(__sparcv9)
- << " -G" // Compile a shared library, `-G' for Sparc
-#else
- << " -fPIC -shared" // `-shared' for Linux/X86, maybe others
-#endif
- << " -fno-strict-aliasing\n";
+ << " gcc -xc temporary.c -O2 -o " << SharedObject;
+ if (TargetTriple.getArch() == Triple::sparc)
+ outs() << " -G"; // Compile a shared library, `-G' for Sparc
+ else
+ outs() << " -fPIC -shared"; // `-shared' for Linux/X86, maybe others
+
+ outs() << " -fno-strict-aliasing\n";
return false;
}