rogfer01 added inline comments.
================
Comment at: lib/Driver/Tools.cpp:5940
+ options::OPT_fno_always_use_bss, false))
+ CmdArgs.push_back("-always-use-bss");
+
----------------
I think you mean `"-falways-use-bss"`.
Please add a test that checks that the driver is forwarding to CC1 the right
flag. You only have a CC1 test that cannot catch this bug.
================
Comment at: lib/Sema/SemaDecl.cpp:10742-10743
+ Expr* InitExpr = var->getInit();
+ if (!InitExpr)
+ return var->hasGlobalStorage();
+
----------------
This check wasn't in the original code. Can you explain why it is needed here?
If it is needed, maybe you want a test for this as well.
================
Comment at: test/CodeGenCXX/zi-sections.cpp:39
+int ArrayMinusTwo[] = {0, -2, 0};
+int ArrayUnInit;
+// CHECK-ZI-DATA: @ShortZero = global i16 0, section ".data.1", align 2
----------------
Would it make sense a test that checks array fillers?
```
int ArrayWithFiller[10] = { 0 };
int ArrayWithFillerTwo[10] = { 0, 2 };
int ArrayWithAllFiller[10] = { };
```
https://reviews.llvm.org/D30326
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits