<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I'm trying to figure out how to feed a blockaddress to a switch
condition AND destination (basically emulating an indirectbr via a
switch; I know it's not a good approach, I'm just experimenting).<br>
Suppose I have the following:<br>
<br>
SwitchInst *s = SwitchInst::Create(...);<br>
BasicBlock *bb = ...;<br>
PtrToIntInst k = new PtrToIntInst(BlockAddress::get(bb),
<TYPE>, "", s);<br>
s->addCase(k, bb);<br>
...<br>
<br>
is this reasonable? what should I put in place of <TYPE> (the
type to cast to)?<br>
<div class="moz-signature">-- <br>
<style type="text/css">
.signature {
}
.signature a, .signature a:link, .signature a:hover, .signature a:active,
</style>
<div style="background:#eee; border:1px solid #ddd; padding:7px
9px; display:inline-block; border-radius:8px;
-moz-border-radius:6px;"> Carlo Alberto Ferraris <<a
href="mailto:cafxx@strayorange.com">cafxx@strayorange.com</a>><br>
<a href="http://cafxx.strayorange.com">website/blog</a> - +39
333 7643 235
</div>
</div>
</body>
</html>