mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-21 12:38:45 +00:00
Move the code that emits the .file directives so that it runs after the
SourceFiles list is fully filled in so that it sees all of the files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42506 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d18ba7c8de
commit
d57c3884af
@ -1971,19 +1971,6 @@ private:
|
|||||||
if (didInitial) return;
|
if (didInitial) return;
|
||||||
didInitial = true;
|
didInitial = true;
|
||||||
|
|
||||||
// Print out .file directives to specify files for .loc directives.
|
|
||||||
if (TAI->hasDotLocAndDotFile()) {
|
|
||||||
const UniqueVector<SourceFileInfo> &SourceFiles = MMI->getSourceFiles();
|
|
||||||
const UniqueVector<std::string> &Directories = MMI->getDirectories();
|
|
||||||
for (unsigned i = 1, e = SourceFiles.size(); i <= e; ++i) {
|
|
||||||
sys::Path FullPath(Directories[SourceFiles[i].getDirectoryID()]);
|
|
||||||
bool AppendOk = FullPath.appendComponent(SourceFiles[i].getName());
|
|
||||||
assert(AppendOk && "Could not append filename to directory!");
|
|
||||||
Asm->EmitFile(i, FullPath.toString());
|
|
||||||
Asm->EOL();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dwarf sections base addresses.
|
// Dwarf sections base addresses.
|
||||||
if (TAI->doesDwarfRequireFrameSection()) {
|
if (TAI->doesDwarfRequireFrameSection()) {
|
||||||
Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
|
Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
|
||||||
@ -2626,9 +2613,6 @@ public:
|
|||||||
MMI = mmi;
|
MMI = mmi;
|
||||||
shouldEmit = true;
|
shouldEmit = true;
|
||||||
|
|
||||||
// Emit initial sections
|
|
||||||
EmitInitial();
|
|
||||||
|
|
||||||
// Create all the compile unit DIEs.
|
// Create all the compile unit DIEs.
|
||||||
ConstructCompileUnitDIEs();
|
ConstructCompileUnitDIEs();
|
||||||
|
|
||||||
@ -2640,6 +2624,23 @@ public:
|
|||||||
|
|
||||||
// Prime section data.
|
// Prime section data.
|
||||||
SectionMap.insert(TAI->getTextSection());
|
SectionMap.insert(TAI->getTextSection());
|
||||||
|
|
||||||
|
// Print out .file directives to specify files for .loc directives. These
|
||||||
|
// are printed out early so that they precede any .loc directives.
|
||||||
|
if (TAI->hasDotLocAndDotFile()) {
|
||||||
|
const UniqueVector<SourceFileInfo> &SourceFiles = MMI->getSourceFiles();
|
||||||
|
const UniqueVector<std::string> &Directories = MMI->getDirectories();
|
||||||
|
for (unsigned i = 1, e = SourceFiles.size(); i <= e; ++i) {
|
||||||
|
sys::Path FullPath(Directories[SourceFiles[i].getDirectoryID()]);
|
||||||
|
bool AppendOk = FullPath.appendComponent(SourceFiles[i].getName());
|
||||||
|
assert(AppendOk && "Could not append filename to directory!");
|
||||||
|
Asm->EmitFile(i, FullPath.toString());
|
||||||
|
Asm->EOL();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Emit initial sections
|
||||||
|
EmitInitial();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user