[cfe-commits] r171415 - in /cfe/trunk: lib/Basic/Targets.cpp test/Frontend/hexagon-target-basic.c

Anshuman Dasgupta adasgupt at codeaurora.org
Wed Jan 2 13:25:57 PST 2013


Author: adasgupt
Date: Wed Jan  2 15:25:57 2013
New Revision: 171415

URL: http://llvm.org/viewvc/llvm-project?rev=171415&view=rev
Log:
Correct Hexagon DataLayout string. Fixes bug 14744.

Patch by Krzysztof Parzyszek!

Added:
    cfe/trunk/test/Frontend/hexagon-target-basic.c
Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=171415&r1=171414&r2=171415&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed Jan  2 15:25:57 2013
@@ -3500,7 +3500,7 @@
   HexagonTargetInfo(const std::string& triple) : TargetInfo(triple)  {
     BigEndian = false;
     DescriptionString = ("e-p:32:32:32-"
-                         "i64:64:64-i32:32:32-i16:16:16-i1:32:32"
+                         "i64:64:64-i32:32:32-i16:16:16-i1:32:32-"
                          "f64:64:64-f32:32:32-a0:0-n32");
 
     // {} in inline assembly are packet specifiers, not assembly variant

Added: cfe/trunk/test/Frontend/hexagon-target-basic.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/hexagon-target-basic.c?rev=171415&view=auto
==============================================================================
--- cfe/trunk/test/Frontend/hexagon-target-basic.c (added)
+++ cfe/trunk/test/Frontend/hexagon-target-basic.c Wed Jan  2 15:25:57 2013
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -emit-llvm -triple hexagon-unknown-unknown %s -S -o /dev/null
+
+// Testcase for bug 14744.  Empty file is sufficient, since the problem
+// was a bad data layout string in the Hexagon target causing an ICE
+// when compiling any Hexagon program.
+
+int x;  // In C99, a translation unit needs to have at least one declaration.
+





More information about the cfe-commits mailing list