diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-05-01 19:55:34 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-05-01 19:55:34 +0000 |
commit | 6f6875835817ee61bdd1eb0bff0603304b28f02b (patch) | |
tree | 6d7debe8ead831b838e9eb0a0a46cfa35b60fbd3 /llvm/lib/MC/MCContext.cpp | |
parent | 59615698d5ec88b24f78dfc56ebdc65fcbf2f923 (diff) | |
download | bcm5719-llvm-6f6875835817ee61bdd1eb0bff0603304b28f02b.tar.gz bcm5719-llvm-6f6875835817ee61bdd1eb0bff0603304b28f02b.zip |
Fix uninitialized variable introduced in r207739.
This was initialized by llvm-mc (calling setDwarfVersion) but other
clients (such as clang, llc, etc) aren't necessarily initializing this
so we were getting garbage DWARF version values in the output.
Initialize it to a reasonable default (the same default used in llvm-mc,
though this is higher than it was (2) previously).
llvm-svn: 207788
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 601903a1731..c16326829d8 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -35,7 +35,7 @@ MCContext::MCContext(const MCAsmInfo *mai, const MCRegisterInfo *mri, : SrcMgr(mgr), MAI(mai), MRI(mri), MOFI(mofi), Allocator(), Symbols(Allocator), UsedNames(Allocator), NextUniqueID(0), CurrentDwarfLoc(0, 0, 0, DWARF2_FLAG_IS_STMT, 0, 0), DwarfLocSeen(false), - GenDwarfForAssembly(false), GenDwarfFileNumber(0), + GenDwarfForAssembly(false), GenDwarfFileNumber(0), DwarfVersion(4), AllowTemporaryLabels(true), DwarfCompileUnitID(0), AutoReset(DoAutoReset) { |