diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-07-11 06:41:14 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-07-11 06:41:14 +0000 |
commit | 6161b9405fba3aa7b39e599d2873fd62e908b1ec (patch) | |
tree | 908b24bbff520ad097b8b64b750efd65924355aa | |
parent | 743b1940846b242e1cdb50d3fc0c6e8fa8dfbf0a (diff) | |
download | bcm5719-llvm-6161b9405fba3aa7b39e599d2873fd62e908b1ec.tar.gz bcm5719-llvm-6161b9405fba3aa7b39e599d2873fd62e908b1ec.zip |
Initialize AsmPrinter::MF in the constructor
MF is normally initialized in AsmPrinter::SetupMachineFunction, but if the file
contains only globals (no functions), then we need this to be initialized
because, when encountering an error, lowerConstant() references it.
This should fix the non-deterministic failures of
test/CodeGen/X86/nonconst-static-iv.ll, etc.
llvm-svn: 186068
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 7c10bd6a1bb..60aa3a71b67 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -98,7 +98,7 @@ AsmPrinter::AsmPrinter(TargetMachine &tm, MCStreamer &Streamer) OutContext(Streamer.getContext()), OutStreamer(Streamer), LastMI(0), LastFn(0), Counter(~0U), SetCounter(0) { - DD = 0; DE = 0; MMI = 0; LI = 0; + DD = 0; DE = 0; MMI = 0; LI = 0; MF = 0; CurrentFnSym = CurrentFnSymForSize = 0; GCMetadataPrinters = 0; VerboseAsm = Streamer.isVerboseAsm(); |