File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ auto GetCppLocation(Context& context, SemIR::LocId loc_id)
43
43
// final entry.
44
44
auto absolute_node_id = absolute_node_ids.back ();
45
45
const auto * ir = GetFile (context, absolute_node_id.check_ir_id ());
46
- if (!ir) {
47
- return clang::SourceLocation ();
48
- }
46
+ CHECK (ir, " Node location points at nonexistent IR" );
49
47
const auto & tree = ir->parse_tree ();
50
48
const auto & source = tree.tokens ().source ();
51
49
auto offset =
@@ -58,7 +56,7 @@ auto GetCppLocation(Context& context, SemIR::LocId loc_id)
58
56
auto file = src_mgr.getFileManager ().getOptionalFileRef (source.filename ());
59
57
if (!file) {
60
58
file = src_mgr.getFileManager ().getVirtualFileRef (
61
- source.filename (), static_cast < off_t >( 0 ), static_cast < time_t >( 0 ) );
59
+ source.filename (), source. text . size ( ), /* ModificationTime= */ 0 );
62
60
}
63
61
src_mgr.overrideFileContents (
64
62
*file, llvm::MemoryBufferRef (source.text (), source.filename ()));
You can’t perform that action at this time.
0 commit comments