1 //===- X86Diagnostic.cpp --------------------------------------------------===//
2 //
3 //                     The MCLinker Project
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 #include "mcld/LD/DWARFLineInfo.h"
10 #include "mcld/Support/TargetRegistry.h"
11 #include "X86.h"
12 
13 namespace mcld {
14 //===----------------------------------------------------------------------===//
15 // createX86Diagnostic - the help function to create corresponding X86Diagnostic
16 //===----------------------------------------------------------------------===//
createX86DiagLineInfo(const mcld::Target & pTarget,const std::string & pTriple)17 DiagnosticLineInfo* createX86DiagLineInfo(const mcld::Target& pTarget,
18                                           const std::string& pTriple) {
19   return new DWARFLineInfo();
20 }
21 
22 }  // namespace mcld
23 
24 //===----------------------------------------------------------------------===//
25 // InitializeX86Diagnostic
26 //===----------------------------------------------------------------------===//
MCLDInitializeX86DiagnosticLineInfo()27 extern "C" void MCLDInitializeX86DiagnosticLineInfo() {
28   // Register the linker frontend
29   mcld::TargetRegistry::RegisterDiagnosticLineInfo(mcld::TheX86_32Target,
30                                                    mcld::createX86DiagLineInfo);
31   mcld::TargetRegistry::RegisterDiagnosticLineInfo(mcld::TheX86_64Target,
32                                                    mcld::createX86DiagLineInfo);
33 }
34