public override void Visit(StringAST stringConstant) { var stringPtr = LLVM.BuildAlloca(_builder, LLVM.ArrayType(LLVM.Int8Type(), (uint)stringConstant.Value.Length + 1), "aString"); var constString = LLVM.ConstString(stringConstant.Value, (uint)stringConstant.Value.Length, _false); LLVM.BuildStore(_builder, constString, stringPtr); _currentValue = LLVM.BuildGEP(_builder, stringPtr, new LLVMValueRef[] { LLVM.ConstInt(LLVM.Int32Type(), 0, _false), LLVM.ConstInt(LLVM.Int32Type(), 0, _false) }, "gepCast"); }
public override void Visit(StringAST stringConstant) { _stateInfo.currentType = new StaticArrayTypeAST { Size = (uint)stringConstant.Value.Length, TypeOfContainedValues = new TypeAST { TypeName = Enum.GetName(typeof(Keyword), Keyword.CHAR).ToLower() } }; }
public virtual void Visit(StringAST stringConstant) { }