Mercurial > hg > truffle
comparison src/share/vm/adlc/archDesc.cpp @ 1972:f95d63e2154a
6989984: Use standard include model for Hospot
Summary: Replaced MakeDeps and the includeDB files with more standardized solutions.
Reviewed-by: coleenp, kvn, kamg
author | stefank |
---|---|
date | Tue, 23 Nov 2010 13:22:55 -0800 |
parents | c18cbe5936b8 |
children | c7b60b601eb4 |
comparison
equal
deleted
inserted
replaced
1971:e33f46fc48ed | 1972:f95d63e2154a |
---|---|
1 // | 1 // |
2 // Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. | 2 // Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 // | 4 // |
5 // This code is free software; you can redistribute it and/or modify it | 5 // This code is free software; you can redistribute it and/or modify it |
6 // under the terms of the GNU General Public License version 2 only, as | 6 // under the terms of the GNU General Public License version 2 only, as |
7 // published by the Free Software Foundation. | 7 // published by the Free Software Foundation. |
1036 fprintf(fp,"\n"); | 1036 fprintf(fp,"\n"); |
1037 fprintf(fp,"// Machine Generated File. Do Not Edit!\n"); | 1037 fprintf(fp,"// Machine Generated File. Do Not Edit!\n"); |
1038 fprintf(fp,"\n"); | 1038 fprintf(fp,"\n"); |
1039 } | 1039 } |
1040 | 1040 |
1041 //---------------------------machineDependentIncludes-------------------------- | 1041 |
1042 // output #include declarations for machine specific files | 1042 //---------------------------addIncludeGuardStart-------------------------- |
1043 void ArchDesc::machineDependentIncludes(ADLFILE &adlfile) { | 1043 // output the start of an include guard. |
1044 const char *basename = adlfile._name; | 1044 void ArchDesc::addIncludeGuardStart(ADLFILE &adlfile, const char* guardString) { |
1045 const char *cp; | |
1046 for (cp = basename; *cp; cp++) | |
1047 if (*cp == '/') basename = cp+1; | |
1048 | |
1049 // Build #include lines | 1045 // Build #include lines |
1050 fprintf(adlfile._fp, "\n"); | 1046 fprintf(adlfile._fp, "\n"); |
1051 fprintf(adlfile._fp, "#include \"incls/_precompiled.incl\"\n"); | 1047 fprintf(adlfile._fp, "#ifndef %s\n", guardString); |
1052 fprintf(adlfile._fp, "#include \"incls/_%s.incl\"\n",basename); | 1048 fprintf(adlfile._fp, "#define %s\n", guardString); |
1053 fprintf(adlfile._fp, "\n"); | 1049 fprintf(adlfile._fp, "\n"); |
1054 | 1050 |
1055 } | 1051 } |
1056 | 1052 |
1053 //---------------------------addIncludeGuardEnd-------------------------- | |
1054 // output the end of an include guard. | |
1055 void ArchDesc::addIncludeGuardEnd(ADLFILE &adlfile, const char* guardString) { | |
1056 // Build #include lines | |
1057 fprintf(adlfile._fp, "\n"); | |
1058 fprintf(adlfile._fp, "#endif // %s\n", guardString); | |
1059 | |
1060 } | |
1061 | |
1062 //---------------------------addInclude-------------------------- | |
1063 // output the #include line for this file. | |
1064 void ArchDesc::addInclude(ADLFILE &adlfile, const char* fileName) { | |
1065 fprintf(adlfile._fp, "#include \"%s\"\n", fileName); | |
1066 | |
1067 } | |
1068 | |
1069 void ArchDesc::addInclude(ADLFILE &adlfile, const char* includeDir, const char* fileName) { | |
1070 fprintf(adlfile._fp, "#include \"%s/%s\"\n", includeDir, fileName); | |
1071 | |
1072 } | |
1057 | 1073 |
1058 //---------------------------addPreprocessorChecks----------------------------- | 1074 //---------------------------addPreprocessorChecks----------------------------- |
1059 // Output C preprocessor code to verify the backend compilation environment. | 1075 // Output C preprocessor code to verify the backend compilation environment. |
1060 // The idea is to force code produced by "adlc -DHS64" to be compiled by a | 1076 // The idea is to force code produced by "adlc -DHS64" to be compiled by a |
1061 // command of the form "CC ... -DHS64 ...", so that any #ifdefs in the source | 1077 // command of the form "CC ... -DHS64 ...", so that any #ifdefs in the source |