Преглед изворни кода

Splat fixes, added debugging info for 'using' fields

Brian Fiete пре 3 година
родитељ
комит
8eda627e2f
5 измењених фајлова са 469 додато и 438 уклоњено
  1. 158 153
      IDEHelper/COFF.cpp
  2. 22 0
      IDEHelper/Compiler/BfIRBuilder.cpp
  3. 5 1
      IDEHelper/Compiler/BfIRCodeGen.cpp
  4. 141 141
      IDEHelper/DbgExprEvaluator.cpp
  5. 143 143
      IDEHelper/DbgModule.cpp

Разлика између датотеке није приказан због своје велике величине
+ 158 - 153
IDEHelper/COFF.cpp


+ 22 - 0
IDEHelper/Compiler/BfIRBuilder.cpp

@@ -3334,6 +3334,13 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
 								constDIType, flags, useIntConstant ? intConstant : BfIRValue());
 								constDIType, flags, useIntConstant ? intConstant : BfIRValue());
 							diFieldTypes.push_back(memberType);
 							diFieldTypes.push_back(memberType);
 
 
+							if (fieldDef->mUsingProtection != BfProtection_Hidden)
+							{
+								auto memberType = DbgCreateStaticMemberType(diForwardDecl, "$using$" + fieldName, fileDIScope, 0,
+									constDIType, flags, useIntConstant ? intConstant : BfIRValue());
+								diFieldTypes.push_back(memberType);
+							}
+
 							if (staticValue)
 							if (staticValue)
 							{
 							{
 								String qualifiedName = DbgGetStaticFieldName(fieldInstance);
 								String qualifiedName = DbgGetStaticFieldName(fieldInstance);
@@ -3384,6 +3391,13 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
 						resolvedFieldDIType, flags, BfIRValue());
 						resolvedFieldDIType, flags, BfIRValue());
 					diFieldTypes.push_back(memberType);
 					diFieldTypes.push_back(memberType);
 
 
+					if (fieldDef->mUsingProtection != BfProtection_Hidden)
+					{
+						auto memberType = DbgCreateStaticMemberType(diForwardDecl, "$using$" + fieldDef->mName, fileDIScope, 0,
+							resolvedFieldDIType, flags, BfIRValue());
+						diFieldTypes.push_back(memberType);
+					}
+
 					StringT<128> staticVarName;
 					StringT<128> staticVarName;
 					BfMangler::Mangle(staticVarName, mModule->mCompiler->GetMangleKind(), fieldInstance);
 					BfMangler::Mangle(staticVarName, mModule->mCompiler->GetMangleKind(), fieldInstance);
 					if (!staticVarName.StartsWith('#'))
 					if (!staticVarName.StartsWith('#'))
@@ -3416,6 +3430,14 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
 						fieldInstance->mDataSize * 8, resolvedFieldType->mAlign * 8, fieldInstance->mDataOffset * 8,
 						fieldInstance->mDataSize * 8, resolvedFieldType->mAlign * 8, fieldInstance->mDataOffset * 8,
 						flags, resolvedFieldDIType);
 						flags, resolvedFieldDIType);
 					diFieldTypes.push_back(memberType);
 					diFieldTypes.push_back(memberType);
+
+					if (fieldDef->mUsingProtection != BfProtection_Hidden)
+					{
+						auto memberType = DbgCreateMemberType(diForwardDecl, "$using$" + fieldName, fileDIScope, lineNum,
+							fieldInstance->mDataSize * 8, resolvedFieldType->mAlign * 8, fieldInstance->mDataOffset * 8,
+							flags, resolvedFieldDIType);
+						diFieldTypes.push_back(memberType);
+					}
 				}
 				}
 			}
 			}
 		}
 		}

+ 5 - 1
IDEHelper/Compiler/BfIRCodeGen.cpp

@@ -4488,7 +4488,11 @@ void BfIRCodeGen::HandleNextCmd()
             os << "\n";
             os << "\n";
             os.flush();*/
             os.flush();*/
 
 
-            auto member = mDIBuilder->createMemberType((llvm::DIScope*)scope, name.c_str(), (llvm::DIFile*)file, lineNumber, sizeInBits, (uint32)alignInBits, offsetInBits, diFlags, (llvm::DIType*)type);
+			const char* namePtr = name.c_str();
+			if (name.IsEmpty())
+				namePtr = NULL;
+
+            auto member = mDIBuilder->createMemberType((llvm::DIScope*)scope, namePtr, (llvm::DIFile*)file, lineNumber, sizeInBits, (uint32)alignInBits, offsetInBits, diFlags, (llvm::DIType*)type);
             SetResult(curId, member);
             SetResult(curId, member);
             //OutputDebugStrF("BfIRCmd_DbgCreateMemberType = %p\n", member);
             //OutputDebugStrF("BfIRCmd_DbgCreateMemberType = %p\n", member);
 		}
 		}

Разлика између датотеке није приказан због своје велике величине
+ 141 - 141
IDEHelper/DbgExprEvaluator.cpp


Разлика између датотеке није приказан због своје велике величине
+ 143 - 143
IDEHelper/DbgModule.cpp


Неке датотеке нису приказане због велике количине промена