[llvm] r211985 - Simplify code a bit, no functionality change.
Rafael Espindola
rafael.espindola at gmail.com
Sat Jun 28 10:46:20 PDT 2014
Author: rafael
Date: Sat Jun 28 12:46:19 2014
New Revision: 211985
URL: http://llvm.org/viewvc/llvm-project?rev=211985&view=rev
Log:
Simplify code a bit, no functionality change.
Modified:
llvm/trunk/tools/llvm-mc/llvm-mc.cpp
Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=211985&r1=211984&r2=211985&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original)
+++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Sat Jun 28 12:46:19 2014
@@ -401,9 +401,9 @@ int main(int argc, char **argv) {
// FIXME: This is not pretty. MCContext has a ptr to MCObjectFileInfo and
// MCObjectFileInfo needs a MCContext reference in order to initialize itself.
- std::unique_ptr<MCObjectFileInfo> MOFI(new MCObjectFileInfo());
- MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr);
- MOFI->InitMCObjectFileInfo(TripleName, RelocModel, CMModel, Ctx);
+ MCObjectFileInfo MOFI;
+ MCContext Ctx(MAI.get(), MRI.get(), &MOFI, &SrcMgr);
+ MOFI.InitMCObjectFileInfo(TripleName, RelocModel, CMModel, Ctx);
if (SaveTempLabels)
Ctx.setAllowTemporaryLabels(false);
More information about the llvm-commits
mailing list