Pipe through source file locations of structure element declarations; these are now supplied to the llvm::DIBuilder::createMemberType() method rather than giving it the position of the overall struct declaration for each one. Fixes issue #31

This commit is contained in:
Matt Pharr
2011-06-29 05:38:42 +01:00
parent 86de910ecd
commit cb58c78c1a
5 changed files with 41 additions and 27 deletions

6
type.h
View File

@@ -442,7 +442,8 @@ private:
class StructType : public Type {
public:
StructType(const std::string &name, const std::vector<const Type *> &elts,
const std::vector<std::string> &eltNames, bool isConst,
const std::vector<std::string> &eltNames,
const std::vector<SourcePos> &eltPositions, bool isConst,
bool isUniform, SourcePos pos);
bool IsUniformType() const;
@@ -501,6 +502,9 @@ private:
*/
const std::vector<const Type *> elementTypes;
const std::vector<std::string> elementNames;
/** Source file position at which each structure element declaration
appeared. */
const std::vector<SourcePos> elementPositions;
const bool isUniform;
const bool isConst;
const SourcePos pos;