]> granicus.if.org Git - clang/commitdiff
Correct Hexagon DataLayout string. Fixes bug 14744.
authorAnshuman Dasgupta <adasgupt@codeaurora.org>
Wed, 2 Jan 2013 21:25:57 +0000 (21:25 +0000)
committerAnshuman Dasgupta <adasgupt@codeaurora.org>
Wed, 2 Jan 2013 21:25:57 +0000 (21:25 +0000)
Patch by Krzysztof Parzyszek!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171415 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/Frontend/hexagon-target-basic.c [new file with mode: 0644]

index aadca20ebb1409ebd250ee5aaad96c3473381738..aaf5a8a794e5ca6427fa6f35f81f22fa548c4690 100644 (file)
@@ -3500,7 +3500,7 @@ public:
   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
diff --git a/test/Frontend/hexagon-target-basic.c b/test/Frontend/hexagon-target-basic.c
new file mode 100644 (file)
index 0000000..2c0e82b
--- /dev/null
@@ -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.
+