diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-18 03:35:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-18 03:35:57 +0000 |
commit | ca7409664273fed4b473127295af3af0836b3077 (patch) | |
tree | 4dec85698109cbee1fa006a2cbcc962b0ec1628b /tools/bugpoint/Miscompilation.cpp | |
parent | 2bd4bb0397135d2ccde8ff6f411da597d9e4ed55 (diff) | |
download | external_llvm-ca7409664273fed4b473127295af3af0836b3077.zip external_llvm-ca7409664273fed4b473127295af3af0836b3077.tar.gz external_llvm-ca7409664273fed4b473127295af3af0836b3077.tar.bz2 |
Change bugpoint to use Triple to make runtime decisions.
- This is cleaner, and makes bugpoint match the host instead of the build
architecture.
- Patch by Sandeep Patel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/Miscompilation.cpp')
-rw-r--r-- | tools/bugpoint/Miscompilation.cpp | 15 |
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; } |