Input files with empty suffixes must be passed to linker.
authorMikhail Glushenkov <foldr@codedgers.com>
Tue, 23 Feb 2010 09:05:21 +0000 (09:05 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Tue, 23 Feb 2010 09:05:21 +0000 (09:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96927 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CompilerDriver/CompilationGraph.cpp
tools/llvmc/plugins/Base/Base.td.in

index a36d3fb692a7f9b6ce1a56b495d8104479fb8c54..7d1c7fe4a62b9c33f200114d00cb503891bb0488 100644 (file)
@@ -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() + '\'');
index d2c1f0c04ed9bae61f8906d391b13592cbd5b55f..6ed47499843ef56a5ba8d5fb082a6480b9c4f275 100644 (file)
@@ -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"]>
      ]>;