[llvm-dev] Adding new a new type

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Mon May 14 16:27:28 PDT 2018


On 5/14/2018 4:18 PM, Jason Ott via llvm-dev wrote:
> I was reading: https://llvm.org/docs/ExtendingLLVM.html
>
> And am heeding the warnings that come with new (derived) types.
>
> I'm trying to use LLVM to model chemicals.  More specifically, there 
> are several reactive groups that exist: salts, bases, acids, etc. that 
> adequately represent their respective values.  I, for obvious reasons, 
> want to manifest those types in LLVM so I can type check a given input 
> and use LLVM for all my compilation needs.
>
> I'm uncertain what I should do with respect to LLVM and the guidance 
> the documentation provides for adding new types.

You almost certainly don't want a new type in that sense.  Try 
https://llvm.org/docs/LangRef.html#structure-type instead.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-dev mailing list