andreybokhanko added a comment.

@rafael, all these changes are driven by tests.

It seems you mean OS targeting, which is handled in other TargetInfo classes 
(LinuxTargetInfo in Linux case).


================
Comment at: lib/Basic/Targets.cpp:801
@@ -818,2 +800,3 @@
     LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble;
+    UserLabelPrefix = "_";
   }
----------------
rafael wrote:
> This looks wrong, we produce a "f:" not an "_f:" when targeting 
> powerpc-linux-gnu.
> 
Is this commented out, tools/clang/test/Preprocessor/init.c:5216 fails. As can 
be seen in the test, PPC603E target expects UserLabelPrefix to be equal to "_" 
in freestanding mode.

As for powerpc-linux-gnu target, UserLabelPrefix is set to "" at 
lib/Basic/Target.cpp:416 (LinuxTargetInfo constructor).

================
Comment at: lib/Basic/Targets.cpp:1617
@@ -1633,2 +1616,3 @@
     GPU = GK_SM20;
+    UserLabelPrefix = "_";
   }
----------------
rafael wrote:
> This also looks wrong.
Same as above -- NVPTX target expects UserLabelPrefix to be "_" in freestanding 
mode (tools/clang/test/Preprocessor/init.c:4853). Linux target is covered in 
LinuxTargetInfo constructor.


http://reviews.llvm.org/D16295



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to