mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Split out filename & directory from DIFile to start generalizing over DIScopes
This is the first step to making all DIScopes have a common metadata prefix (so that things (using directives, for example) that can appear in any scope can be added to that common prefix). DIFile is itself a DIScope so the common prefix of all DIScopes cannot be a DIFile - instead it's the raw filename/directory name pair. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177239 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -117,11 +117,14 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
|
||||
/// for a file.
|
||||
DIFile DIBuilder::createFile(StringRef Filename, StringRef Directory) {
|
||||
assert(!Filename.empty() && "Unable to create file without name");
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_file_type),
|
||||
Value *Pair[] {
|
||||
MDString::get(VMContext, Filename),
|
||||
MDString::get(VMContext, Directory),
|
||||
};
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_file_type),
|
||||
MDNode::get(VMContext, Pair)
|
||||
};
|
||||
return DIFile(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user