LGTM with tiny fixes.

================
Comment at: lib/CodeGen/CodeGenAction.cpp:554-557
@@ -553,3 +553,6 @@
 
+  StringRef mainFileName = getCompilerInstance().getCodeGenOpts().MainFileName;
+  if (mainFileName.empty())
+    mainFileName = InFile;
   BEConsumer = new BackendConsumer(BA, CI.getDiagnostics(), 
CI.getCodeGenOpts(),
                                    CI.getTargetOpts(), CI.getLangOpts(),
----------------
Per coding convention, this should be named `MainFileName`.

================
Comment at: test/Misc/main-file-name.c:1
@@ +1,2 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - %s -main-file-name some.name | FileCheck 
-check-prefix NAMED %s
----------------
This test should be in `tests/CodeGen`.

http://reviews.llvm.org/D3836



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to