[llvm] r234515 - Define a function with "... llvm::func...".
Rafael Espindola
rafael.espindola at gmail.com
Thu Apr 9 11:08:16 PDT 2015
Author: rafael
Date: Thu Apr 9 13:08:15 2015
New Revision: 234515
URL: http://llvm.org/viewvc/llvm-project?rev=234515&view=rev
Log:
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.
Modified:
llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp
Modified: llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp?rev=234515&r1=234514&r2=234515&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp Thu Apr 9 13:08:15 2015
@@ -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);
}
More information about the llvm-commits
mailing list