summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r--llvm/lib/MC/MCContext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 27f66d8393f..5ec5c35630c 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -391,7 +391,9 @@ unsigned MCContext::GetDwarfFile(StringRef Directory, StringRef FileName,
// vector.
char *Buf = static_cast<char *>(Allocate(FileName.size()));
memcpy(Buf, FileName.data(), FileName.size());
- File = new (*this) MCDwarfFile(StringRef(Buf, FileName.size()), DirIndex);
+ File = new (*this) MCDwarfFile;
+ File->Name = StringRef(Buf, FileName.size());
+ File->DirIndex = DirIndex;
// return the allocated FileNumber.
return FileNumber;
OpenPOWER on IntegriCloud