diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-01 11:07:05 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-01 11:07:05 +0000 |
commit | 06f9d4012fb8acea3e9861d5722b5965dbb724d9 (patch) | |
tree | ffe0478472eaa0686f11cb02c6df7d257b8719b0 /tools | |
parent | 76e2e0ebfdd3d91b07a75822865ea3e9121a99ce (diff) | |
download | src-test2-06f9d4012fb8acea3e9861d5722b5965dbb724d9.tar.gz src-test2-06f9d4012fb8acea3e9861d5722b5965dbb724d9.zip |
Notes
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-config/llvm-config.in.in | 4 | ||||
-rw-r--r-- | tools/llvmc/doc/LLVMC-Reference.rst | 2 | ||||
-rw-r--r-- | tools/llvmc/example/Hello/Hello.cpp | 4 | ||||
-rw-r--r-- | tools/llvmc/plugins/Base/Base.td.in | 20 | ||||
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 2 | ||||
-rw-r--r-- | tools/opt/GraphPrinters.cpp | 6 |
6 files changed, 34 insertions, 4 deletions
diff --git a/tools/llvm-config/llvm-config.in.in b/tools/llvm-config/llvm-config.in.in index 7f93f168dfd8..d0edda0ef55c 100644 --- a/tools/llvm-config/llvm-config.in.in +++ b/tools/llvm-config/llvm-config.in.in @@ -333,6 +333,10 @@ sub build_name_map { if (defined $NAME_MAP{$target.'asmparser'}) { push @{$NAME_MAP{$target}},$target.'asmparser' } + + if (defined $NAME_MAP{$target.'disassembler'}) { + push @{$NAME_MAP{$target}},$target.'disassembler' + } } # Add virtual entries. diff --git a/tools/llvmc/doc/LLVMC-Reference.rst b/tools/llvmc/doc/LLVMC-Reference.rst index b92ab699b13f..102795ea209c 100644 --- a/tools/llvmc/doc/LLVMC-Reference.rst +++ b/tools/llvmc/doc/LLVMC-Reference.rst @@ -448,7 +448,7 @@ use TableGen inheritance instead. - ``element_in_list`` - Returns true if a command-line parameter list contains a given value. - Example: ``(parameter_in_list "l", "pthread")``. + Example: ``(element_in_list "l", "pthread")``. - ``input_languages_contain`` - Returns true if a given language belongs to the current input language set. diff --git a/tools/llvmc/example/Hello/Hello.cpp b/tools/llvmc/example/Hello/Hello.cpp index 9c96bd0a416b..a7179eae8bd1 100644 --- a/tools/llvmc/example/Hello/Hello.cpp +++ b/tools/llvmc/example/Hello/Hello.cpp @@ -17,6 +17,10 @@ namespace { struct MyPlugin : public llvmc::BasePlugin { + + void PreprocessOptions() const + {} + void PopulateLanguageMap(llvmc::LanguageMap&) const { outs() << "Hello!\n"; } diff --git a/tools/llvmc/plugins/Base/Base.td.in b/tools/llvmc/plugins/Base/Base.td.in index c26a567ba54f..125e95c05e06 100644 --- a/tools/llvmc/plugins/Base/Base.td.in +++ b/tools/llvmc/plugins/Base/Base.td.in @@ -38,6 +38,10 @@ def OptList : OptionList<[ (help "Compile and assemble, but do not link")), (switch_option "pthread", (help "Enable threads")), + (switch_option "fPIC", + (help "Relocation model: PIC"), (hidden)), + (switch_option "mdynamic-no-pic", + (help "Relocation model: dynamic-no-pic"), (hidden)), (parameter_option "linker", (help "Choose linker (possible values: gcc, g++)")), (parameter_option "MF", @@ -47,6 +51,12 @@ def OptList : OptionList<[ (hidden)), (parameter_list_option "include", (help "Include the named file prior to preprocessing")), + (parameter_list_option "framework", + (help "Specifies a framework to link against")), + (parameter_list_option "weak_framework", + (help "Specifies a framework to weakly link against"), (hidden)), + (prefix_list_option "F", + (help "Add a directory to framework search path")), (prefix_list_option "I", (help "Add a directory to include path")), (prefix_list_option "D", @@ -105,11 +115,15 @@ class llvm_gcc_based <string cmd_prefix, string in_lang, string E_ext> : Tool< (and (switch_on "emit-llvm"), (switch_on "c")), (stop_compilation), (switch_on "fsyntax-only"), (stop_compilation), (not_empty "include"), (forward "include"), + (not_empty "save-temps"), (append_cmd "-save-temps"), (not_empty "I"), (forward "I"), + (not_empty "F"), (forward "F"), (not_empty "D"), (forward "D"), (switch_on "O1"), (forward "O1"), (switch_on "O2"), (forward "O2"), (switch_on "O3"), (forward "O3"), + (switch_on "fPIC"), (forward "fPIC"), + (switch_on "mdynamic-no-pic"), (forward "mdynamic-no-pic"), (not_empty "MF"), (forward "MF"), (not_empty "MT"), (forward "MT"))), (sink) @@ -162,6 +176,9 @@ def llc : Tool< (switch_on "O1"), (forward "O1"), (switch_on "O2"), (forward "O2"), (switch_on "O3"), (forward "O3"), + (switch_on "fPIC"), (append_cmd "-relocation-model=pic"), + (switch_on "mdynamic-no-pic"), + (append_cmd "-relocation-model=dynamic-no-pic"), (not_empty "Wllc,"), (unpack_values "Wllc,"))) ]>; @@ -175,6 +192,9 @@ class llvm_gcc_based_linker <string cmd_prefix> : Tool< (actions (case (switch_on "pthread"), (append_cmd "-lpthread"), (not_empty "L"), (forward "L"), + (not_empty "F"), (forward "F"), + (not_empty "framework"), (forward "framework"), + (not_empty "weak_framework"), (forward "weak_framework"), (not_empty "l"), (forward "l"), (not_empty "Wl,"), (forward "Wl,"))) ]>; diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 0b9cb2952e83..060fc4fdb056 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -305,7 +305,7 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg) } // construct LTModule, hand over ownership of module and target - const std::string FeatureStr = + const std::string FeatureStr = SubtargetFeatures::getDefaultSubtargetFeatures(llvm::Triple(Triple)); _target = march->createTargetMachine(Triple, FeatureStr); } diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp index 1ae6be253f78..bbf8d122e7c7 100644 --- a/tools/opt/GraphPrinters.cpp +++ b/tools/opt/GraphPrinters.cpp @@ -46,12 +46,14 @@ static void WriteGraphToFile(std::ostream &O, const std::string &GraphName, namespace llvm { template<> struct DOTGraphTraits<CallGraph*> : public DefaultDOTGraphTraits { + + DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {} + static std::string getGraphName(CallGraph *F) { return "Call Graph"; } - static std::string getNodeLabel(CallGraphNode *Node, CallGraph *Graph, - bool ShortNames) { + static std::string getNodeLabel(CallGraphNode *Node, CallGraph *Graph) { if (Node->getFunction()) return ((Value*)Node->getFunction())->getName(); else |