File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -782,6 +782,18 @@ public Function CreateFunction( string name
782782 /// <param name="name">Name of the intrinsic</param>
783783 /// <param name="args">Args for the intrinsic</param>
784784 /// <returns>Function declaration</returns>
785+ /// <remarks>
786+ /// This method will match overloaded intrinsics based on the parameter types. If an intrinsic
787+ /// has no overloads then an exact match is required. If the intrinsic has overloads than a prefix
788+ /// match is used.
789+ /// <note type="important">
790+ /// It is important to note that the prefix match requires the name provided to have a length greater
791+ /// than that of the name of the intrinsic and that the name starts with a matching overloaded intrinsic.
792+ /// for example: 'llvm.memset' would not match the overloaded memset intrinsic but 'llvm.memset.p.i' does.
793+ /// Thus, it is generally a good idea to use the signature from the LLVM documentation without the address
794+ /// space, or bit widths. That is instead of 'llvm.memset.p0i8.i32' use 'llvm.memset.p.i'.
795+ /// </note>
796+ /// </remarks>
785797 public Function GetIntrinsicDeclaration ( string name , params ITypeRef [ ] args )
786798 {
787799 uint id = Intrinsic . LookupId ( name ) ;
Original file line number Diff line number Diff line change @@ -1278,7 +1278,7 @@ public CallInstruction DebugTrap( )
12781278 public CallInstruction Trap ( )
12791279 {
12801280 var module = GetModuleOrThrow ( ) ;
1281- var func = module . GetIntrinsicDeclaration ( "llvm.debugtrap " ) ;
1281+ var func = module . GetIntrinsicDeclaration ( "llvm.trap " ) ;
12821282
12831283 return Call ( func ) ;
12841284 }
You can’t perform that action at this time.
0 commit comments