mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
CodeGen: Stop using DIDescriptor::is*() and auto-casting
Same as r234255, but for lib/CodeGen and lib/Target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234258 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -20,12 +20,11 @@ namespace llvm {
|
||||
|
||||
StringRef WinCodeViewLineTables::getFullFilepath(const MDNode *S) {
|
||||
assert(S);
|
||||
DIDescriptor D(S);
|
||||
assert((D.isCompileUnit() || D.isFile() || D.isSubprogram() ||
|
||||
D.isLexicalBlockFile() || D.isLexicalBlock()) &&
|
||||
assert((isa<MDCompileUnit>(S) || isa<MDFile>(S) || isa<MDSubprogram>(S) ||
|
||||
isa<MDLexicalBlockBase>(S)) &&
|
||||
"Unexpected scope info");
|
||||
|
||||
DIScope Scope(S);
|
||||
DIScope Scope = cast<MDScope>(S);
|
||||
StringRef Dir = Scope.getDirectory(),
|
||||
Filename = Scope.getFilename();
|
||||
char *&Result = DirAndFilenameToFilepathMap[std::make_pair(Dir, Filename)];
|
||||
|
Reference in New Issue
Block a user