diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-29 02:38:34 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-29 02:38:34 +0000 |
commit | 7d065d0f21b35f445cee13730398bc2bec6edff2 (patch) | |
tree | b5613c24902adb360cb947ce924a85f2a3afdfc2 /lib/CodeGen/CGDebugInfo.cpp | |
parent | 85b4521e34dcd4a0a4a1f0819e1123128e5a3125 (diff) |
Move MainFileName option variable into CodeGenOptions instead of LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 558bb5bc96..317da7e46a 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -95,10 +95,10 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) { // file at a time. bool isMain = false; const LangOptions &LO = M->getLangOptions(); - const char *MainFileName = LO.getMainFileName(); + const CodeGenOptions &CGO = M->getCodeGenOpts(); if (isMainCompileUnitCreated == false) { - if (MainFileName) { - if (!strcmp(AbsFileName.getLast().c_str(), MainFileName)) + if (!CGO.MainFileName.empty()) { + if (AbsFileName.getLast() == CGO.MainFileName) isMain = true; } else { if (Loc.isValid() && SM.isFromMainFile(Loc)) |