From: Rafael Espindola Date: Thu, 9 Apr 2015 18:08:15 +0000 (+0000) Subject: Define a function with "... llvm::func...". X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8ee55c79f28236b03d5c3c5009ea8bc300dc2f24;p=oota-llvm.git Define a function with "... llvm::func...". Using this instead of namespace llvm { func... } Has the advantage that the build fails with a compiler error if it gets out of sync with the .h file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234515 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/WinCOFFObjectWriter.cpp b/lib/MC/WinCOFFObjectWriter.cpp index b62b342edd1..da4324733f0 100644 --- a/lib/MC/WinCOFFObjectWriter.cpp +++ b/lib/MC/WinCOFFObjectWriter.cpp @@ -127,7 +127,7 @@ public: bool UseBigObj; WinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, raw_ostream &OS); - + void reset() override { memset(&Header, 0, sizeof(Header)); Header.Machine = TargetObjectWriter->getMachine(); @@ -1073,9 +1073,8 @@ void MCWinCOFFObjectTargetWriter::anchor() {} //------------------------------------------------------------------------------ // WinCOFFObjectWriter factory function -namespace llvm { - MCObjectWriter *createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, - raw_ostream &OS) { - return new WinCOFFObjectWriter(MOTW, OS); - } +MCObjectWriter * +llvm::createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, + raw_ostream &OS) { + return new WinCOFFObjectWriter(MOTW, OS); }