Created
July 16, 2010 16:04
-
-
Save jyasskin/478544 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void | |
update_class_location(tree cls, location_t new_location) | |
{ | |
tree instantiations, tmpl_info, tmpl_decl; | |
DECL_SOURCE_LOCATION (TYPE_NAME (cls)) = new_location; | |
if ((tmpl_info = CLASSTYPE_TEMPLATE_INFO (cls))) | |
{ | |
tmpl_decl = TI_TEMPLATE (tmpl_info); | |
for (instantiations = DECL_TEMPLATE_INSTANTIATIONS (tmpl_decl); | |
instantiations; | |
instantiations = TREE_CHAIN (instantiations)) | |
{ | |
tree inst_decl = TYPE_NAME (TREE_VALUE (instantiations)); | |
if (COMPLETE_TYPE_P (inst_decl)) | |
continue; | |
DECL_SOURCE_LOCATION (inst_decl) = new_location; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment