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.

llvm-svn: 234515
This commit is contained in:
Rafael Espindola 2015-04-09 18:08:15 +00:00
parent 068898cb83
commit 37099d9afd
1 changed files with 5 additions and 6 deletions

View File

@ -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);
}