summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-02-23 09:05:21 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-02-23 09:05:21 +0000
commitcf68f26bebc668382cc46faae7e7877fd4918b0e (patch)
treeefc8cae6f26bb672a798d233ae3cdb5b0c7e9158
parent3f8f81e39a5cf514462399469f11dc308a962cba (diff)
downloadbcm5719-llvm-cf68f26bebc668382cc46faae7e7877fd4918b0e.tar.gz
bcm5719-llvm-cf68f26bebc668382cc46faae7e7877fd4918b0e.zip
Input files with empty suffixes must be passed to linker.
llvm-svn: 96927
-rw-r--r--llvm/lib/CompilerDriver/CompilationGraph.cpp3
-rw-r--r--llvm/tools/llvmc/plugins/Base/Base.td.in2
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CompilerDriver/CompilationGraph.cpp b/llvm/lib/CompilerDriver/CompilationGraph.cpp
index a36d3fb692a..7d1c7fe4a62 100644
--- a/llvm/lib/CompilerDriver/CompilationGraph.cpp
+++ b/llvm/lib/CompilerDriver/CompilationGraph.cpp
@@ -34,7 +34,8 @@ namespace llvmc {
const std::string& LanguageMap::GetLanguage(const sys::Path& File) const {
StringRef suf = File.getSuffix();
- LanguageMap::const_iterator Lang = this->find(suf);
+ LanguageMap::const_iterator Lang =
+ this->find(suf.empty() ? "*empty*" : suf);
if (Lang == this->end())
throw std::runtime_error("File '" + File.str() +
"' has unknown suffix '" + suf.str() + '\'');
diff --git a/llvm/tools/llvmc/plugins/Base/Base.td.in b/llvm/tools/llvmc/plugins/Base/Base.td.in
index d2c1f0c04ed..6ed47499843 100644
--- a/llvm/tools/llvmc/plugins/Base/Base.td.in
+++ b/llvm/tools/llvmc/plugins/Base/Base.td.in
@@ -311,7 +311,7 @@ def LanguageMap : LanguageMap<
LangToSuffixes<"assembler-with-cpp", ["S"]>,
LangToSuffixes<"llvm-assembler", ["ll"]>,
LangToSuffixes<"llvm-bitcode", ["bc"]>,
- LangToSuffixes<"object-code", ["o"]>,
+ LangToSuffixes<"object-code", ["o", "*empty*"]>,
LangToSuffixes<"executable", ["out"]>
]>;
OpenPOWER on IntegriCloud