diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-16 04:25:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-16 04:25:29 +0000 |
commit | 91f4a0ff589541d346293ec222102574da16bcb2 (patch) | |
tree | 3855581a3d42d7db9dfa5dc0a78c366a301a92fa /llvm/lib/Target/CBackend | |
parent | 0701828be34cc12446eaeefd24c3183f578c25f1 (diff) | |
download | bcm5719-llvm-91f4a0ff589541d346293ec222102574da16bcb2.tar.gz bcm5719-llvm-91f4a0ff589541d346293ec222102574da16bcb2.zip |
Switch from generating the int128 typedefs based on targetdata to generating
them based on the end-compiler's capabilities. This fixes PR2453
llvm-svn: 52297
Diffstat (limited to 'llvm/lib/Target/CBackend')
-rw-r--r-- | llvm/lib/Target/CBackend/CBackend.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp index 6829218aad2..2e9902d2e3b 100644 --- a/llvm/lib/Target/CBackend/CBackend.cpp +++ b/llvm/lib/Target/CBackend/CBackend.cpp @@ -1517,12 +1517,10 @@ static void generateCompilerSpecificCode(std::ostream& Out, // Output typedefs for 128-bit integers. If these are needed with a // 32-bit target or with a C compiler that doesn't support mode(TI), // more drastic measures will be needed. - if (TD->getPointerSize() >= 8) { - Out << "#ifdef __GNUC__ /* 128-bit integer types */\n" - << "typedef int __attribute__((mode(TI))) llvmInt128;\n" - << "typedef unsigned __attribute__((mode(TI))) llvmUInt128;\n" - << "#endif\n\n"; - } + Out << "#if __GNUC__ && __LP64__ /* 128-bit integer types */\n" + << "typedef int __attribute__((mode(TI))) llvmInt128;\n" + << "typedef unsigned __attribute__((mode(TI))) llvmUInt128;\n" + << "#endif\n\n"; // Output target-specific code that should be inserted into main. Out << "#define CODE_FOR_MAIN() /* Any target-specific code for main()*/\n"; |