| 192 | }*/ |
| 193 | |
| 194 | CDepFile* CDepChecker::LoadFile(const StringImpl& inFileName, CDepFile* fileFrom, bool* isFromCache, const char* contentOverride) |
| 195 | { |
| 196 | *isFromCache = false; |
| 197 | |
| 198 | if (mAbort) |
| 199 | return NULL; |
| 200 | |
| 201 | AutoPerf autoPerf("LoadFile", gPerfManagerPtr); |
| 202 | |
| 203 | #ifdef _WIN32 |
| 204 | String fileName = ToUpper(inFileName); |
| 205 | #else |
| 206 | String fileName = inFileName; |
| 207 | #endif |
| 208 | |
| 209 | if (mFindHeaderFileName.length() > 0) |
| 210 | { |
| 211 | if (fileFrom != NULL) |
| 212 | { |
| 213 | if ((mFindHeaderIdx == -1) && (fileName == mFindHeaderFileName)) |
| 214 | mFindHeaderIdx = fileFrom->mParser->mLineStart; |
| 215 | return NULL; |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | |
| 220 | //Val128 val128 = cDepPreprocState->mBaseHash; |
| 221 | //HASH128_MIXIN_STR(val128, fileName); |
| 222 | |
| 223 | |
| 224 | CDepFile* dataCDep = NULL; |
| 225 | |
| 226 | auto depFileItr = mDepFileMap.find(fileName); |
| 227 | if (depFileItr != mDepFileMap.end()) |
| 228 | { |
| 229 | auto checkCDepFile = depFileItr->second; |
| 230 | depFileItr++; |
| 231 | |
| 232 | dataCDep = checkCDepFile; |
| 233 | |
| 234 | if (checkCDepFile->mProcessing) |
| 235 | { |
| 236 | BF_ASSERT(fileFrom != NULL); |
| 237 | // Propagate include files down the line once we finish processing cDepFile |
| 238 | checkCDepFile->mDeferredDepSet.insert(fileFrom); |
| 239 | for (auto childDep : fileFrom->mDeferredDepSet) |
| 240 | checkCDepFile->mDeferredDepSet.insert(childDep); |
| 241 | } |
| 242 | |
| 243 | *isFromCache = true; |
| 244 | return checkCDepFile; |
| 245 | } |
| 246 | |
| 247 | CDepFile* cDepFile = new CDepFile(); |
| 248 | cDepFile->mFilePath = fileName; |
| 249 | cDepFile->mFilesReferenced.insert(fileName); |
| 250 | cDepFile->mProcessing = true; |
| 251 |
no test coverage detected